package io.renren.service;

import com.alibaba.fastjson.JSONObject;
import io.renren.common.page.PageData;
import io.renren.common.service.CrudService;
import io.renren.common.utils.Result;
import io.renren.dto.StockOrderDTO;
import io.renren.entity.StockOrderEntity;
import io.renren.entity.UserEntity;

import java.util.List;
import java.util.Map;

/**
 * 食材采购表
 *
 * @author 翟文闯 619556390@QQ.com
 * @since 1.0.0 2019-11-22
 */
public interface StockOrderService extends CrudService<StockOrderEntity, StockOrderDTO> {
    List<StockOrderDTO> home(Map<String, Object> params);
    PageData<StockOrderDTO>  getOrder(Map<String, Object> params, UserEntity entity);

    StockOrderDTO get(long id);

    Result updateExamine(StockOrderDTO dto, UserEntity userEntity);//, UserEntity userEntity)
    Result UpdateSupplierStutas(StockOrderDTO dto, UserEntity userEntity);

    PageData<StockOrderDTO> pageAdmin(Map<String, Object> params, UserEntity entity);

    PageData<StockOrderDTO> pagesTorehouseClerk(Map<String, Object> params, UserEntity entity);
    //食材订单
    Map   selecSupplierOd(Long supplierId);
    void deleteOrder(Long id);
    void saveOrder(JSONObject params,UserEntity entity);

    //查询订单未处理的状态
    StockOrderDTO getTotal(Long chedId, Long clerkId,Long canteenId,int status);
    //根据时间 判断食材订单数量，根据订单查询商品
    List<StockOrderDTO> getOrderNum(String bgeinDate,String endDate);
    //所有订单
    List<StockOrderDTO> getOrder2(String bgeinDate, String endDate, long supplierId);
}